-- GENERATED SPELL FOR [Dragonflayer Runecaster] --


function spell0_23960(pUnit, Event) --@Bolthorn\'s Rune of Flame,n/a--
pUnit:FullCastSpellOnTarget(54965,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23960', 9500, 1)
end

function spell1_23960(pUnit, Event) --@Bolthorn\'s Rune of Flame,n/a--
pUnit:FullCastSpellOnTarget(59617,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23960', 9500, 1)
end

function spell2_23960(pUnit, Event) --@Njord\'s Rune of Protection,n/a--
pUnit:FullCastSpellOnTarget(42740,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23960', 9500, 1)
end

function spell3_23960(pUnit, Event) --@Njord\'s Rune of Protection,n/a--
pUnit:FullCastSpellOnTarget(59616,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23960', 9500, 1)
end

function Sorts_23960(pUnit, Event)
local choix_sorts_23960 = math.random(0, 3)
if choix_sorts_23960 == 0 then
pUnit:RegisterEvent('spell0_23960', 1, 1)
end
if choix_sorts_23960 == 1 then
pUnit:RegisterEvent('spell1_23960', 1, 1)
end
if choix_sorts_23960 == 2 then
pUnit:RegisterEvent('spell2_23960', 1, 1)
end
if choix_sorts_23960 == 3 then
pUnit:RegisterEvent('spell3_23960', 1, 1)
end
end

function mob23960_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_23960', math.random(1500, 3000), 1)
end

function mob23960_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23960_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23960_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(23960, 1, 'mob23960_Action')
RegisterUnitEvent(23960, 2, 'mob23960_Leave')
RegisterUnitEvent(23960, 3, 'mob23960_Kill')
RegisterUnitEvent(23960, 4, 'mob23960_Die')
